import request from './request'

// 请求首页的数据
export const GetHomeLists = () => request.get('/index/index')

//baseurl/search/index搜索数据
export const GetBaseurlList = () => request.get('/search/index');

//实时搜索数据/search/helper
export const GetHelperList = (params) => request.get('/search/helper',{params});
//删除历史数据/search/clearhistory
export const GetClearhistoryList = () => request.get('/search/clearhistory');

//商品详情
export const GetDetail = (params) => request.get('/goods/detail',{params});
//相关产品
export const GetRelated = (params) => request.get('/goods/related',{params});
//购物车数量/cart/goodscount
export const GetGoodscount = () => request.get('/cart/goodscount');

//搜索商品
export const GetList = (params) => request.get('/goods/list',{params});

// 搜索功能
export const GetSearchList = (params) => request.get('/search/helper', {params});

//专题页面
export const GetTopicList = (params) => request.get('/topic/list', {params});

//全部分类
export const GetCatalogList = () => request.get('/catalog/index');

//当前分类
export const GetCurrentList = (params) => request.get('/catalog/current', {params});
//登录
export const GetAuthList = (params) => request.post('/auth/loginByWeb', params);

//加入购物车
export const GetCartAdd = (params) => request.post('/cart/add', params);

//分类/goods/category
export const GetGoodsCategory = (params) => request.get('/goods/category', {params});
//分类数据
// export const GetGoodsCategory = (params) => request.get('/goods/list', {params});
//购物车数据
export const GetcartList = () => request.get('/cart/index');

//购物车复选框
export const GetChecked = (params) => request.post('/cart/checked',params);

///cart/update
export const GetUpdate = (params) => request.post('/cart/update',params);
//删除商品
export const GetDelete = (params) => request.post('/cart/delete',params);